package y23.Dec;

import java.util.ArrayList;
import java.util.List;

public class Test6 {
    public static void main(String[] args) {
        System.out.println(new Test6().findTheDifference("abcd","abcde"));
    }
    public boolean findTheDifference(String s, String t) {
        if (s.length() == 0 || t.length() == 0){
            return true;
        }
        int[] sArr = new int[26];
        int[] tArr = new int[26];
        for (int i = 0; i < s.length(); i++) {
            sArr[s.charAt(i)-'a']++;
        }
        for (int i = 0; i < t.length(); i++) {
            tArr[t.charAt(i)-'a']++;
        }
        int count = 0;
        for (int i = 0; i < 26; i++) {
            if (tArr[i] != sArr[i]){
                count++;
            }
        }
        if (count == 0){
            return true;
        }else {
            return false;
        }
    }
}
